package com.jtjrenren.android.taxi.driver.manger.task;

import android.content.Context;

import com.library.utils.FileUtils;

import java.io.File;

/**
 * Created by Administrator on 2016/5/24.
 */
public class CheckTTSFileTask implements Runnable {
    public static final String TTS_PATH = FileUtils.getSDCardPath() + "/rrcx/tts";
    public static final String TTS_TEXT_MODEL_FILE = TTS_PATH + File.separator + "bd_etts_text.dat";
    public static final String TTS_SPEECH_MODEL_FILE = TTS_PATH + File.separator + "bd_etts_speech_female.dat";
    private Context context;

    public CheckTTSFileTask(Context context) {
        this.context = context;
    }

    @Override
    public void run() {
        File file = new File(TTS_PATH);
        if (!file.exists()) {
            file.mkdirs();
        }

        FileUtils.copyFromAssetsToSdcard(context, false, "bd_etts_ch_text.dat", TTS_TEXT_MODEL_FILE);
        FileUtils.copyFromAssetsToSdcard(context, false, "bd_etts_ch_speech_female.dat",TTS_SPEECH_MODEL_FILE);
    }
}
